home *** CD-ROM | disk | FTP | other *** search
- public _cvhexb2bcd
-
- ;∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞
- ; Convers hex AL to BCDpacked AX
- ; In:
- ; AL - hex num to convert
- ; Out:
- ; AX - BCDpacked number
- ;∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞
- _cvhexb2bcd:
- push bx
- push cx
- xor cx,cx
- xor ah,ah
- mov bl,100
- div bl
- or cl,al
- shl cx,4
- shr ax,8
- mov bl,10
- div bl
- or cl,al
- shl cx,4
- or cl,ah
- mov ax,cx
- pop cx
- pop bx
- ret
-
-